package jsonobj;

import com.google.gson.Gson;

public class Response implements JSonObj{
	public boolean success;
	public byte err;
	
	public Response() {}
	
	public Response(boolean success,byte err)
	{
		this.success = success;
		this.err = err;
	}
	
	public String toString()
	{
		return RESPONSE+"|"+ new Gson().toJson(this);
	}
	
	public static Response fromJSon(String json)
	{
		return new Gson().fromJson(json,Response.class);
	}
	
}
